/* ==========================================================================
   dashboard-clinical.css  —  "Clean Clinical Light" design system
   Shared by the user dashboard (index.html) and the doctor dashboard
   (doctor-view.html). Reuses the existing theme-hrms.css tokens (so it
   harmonises with the injected nav shell) with safe fallbacks.
   ========================================================================== */
:root {
  --dc-primary: var(--hrms-primary, #2B4C7E);
  --dc-primary-soft: #eef3f9;
  --dc-teal: #0ea5e9;
  --dc-teal-soft: #e0f2fe;
  --dc-green: #0ea371;
  --dc-green-soft: #dcfce7;
  --dc-amber: #d97706;
  --dc-amber-soft: #fef3c7;
  --dc-rose: #e11d48;
  --dc-rose-soft: #ffe4e6;
  --dc-violet: #1E3A5F;
  --dc-violet-soft: #eef3f9;
  --dc-slate: #475569;
  --dc-slate-soft: #eef1f6;

  /* ---- chart / metric SERIES colors — the ONE place to recolor the dashboard charts.
     The JS charts read these at runtime, so changing a value here updates every chart,
     sparkline and legend on both dashboards. ---- */
  --dc-series-op: #0ea5e9;
  --dc-series-ip: #0ea371;
  --dc-series-discharge: #e11d48;
  --dc-series-umr: #2B4C7E;
  --dc-series-opd: #1E3A5F;

  --dc-page: #f4f6fb;
  --dc-surface: #ffffff;
  --dc-surface-2: #fafbfd;
  --dc-border: var(--hrms-border, #e6e9f2);
  --dc-text: var(--hrms-text, #0e1430);
  --dc-muted: var(--hrms-text-muted, #5b6280);
  --dc-dim: var(--hrms-text-dim, #98a0b8);
  --dc-radius: 16px;
  --dc-radius-sm: 12px;
  --dc-shadow: 0 1px 2px rgba(16, 24, 64, .04), 0 8px 24px rgba(16, 24, 64, .06);
  --dc-shadow-hover: 0 4px 10px rgba(16, 24, 64, .08), 0 18px 40px rgba(16, 24, 64, .12);
}

/* page canvas ------------------------------------------------------------- */
.pcoded-content .dc-wrap,
.dc-wrap { padding: 4px 6px 40px; }

body { background: var(--dc-page); }

/* Hero -------------------------------------------------------------------- */
.dc-hero {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 22px 24px;
  border-radius: var(--dc-radius);
  background:
    radial-gradient(1200px 200px at 0% 0%, rgba(43,76,126,.08), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  border: 1px solid var(--dc-border);
  box-shadow: var(--dc-shadow);
  margin-bottom: 18px;
}
.dc-hero-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--dc-primary);
}
.dc-hero h1 {
  margin: 4px 0 2px; font-size: 26px; line-height: 1.15; font-weight: 800; color: var(--dc-text);
}
.dc-hero-date { color: var(--dc-muted); font-size: 14px; font-weight: 500; }
.dc-hero-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dc-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--dc-surface); border: 1px solid var(--dc-border);
  font-size: 13px; font-weight: 600; color: var(--dc-text); box-shadow: var(--dc-shadow);
}
.dc-chip i { color: var(--dc-primary); }
.dc-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dc-green);
  box-shadow: 0 0 0 3px var(--dc-green-soft); }

/* Command bar (search + quick actions) ------------------------------------ */
.dc-command { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.dc-search { position: relative; flex: 1 1 320px; min-width: 240px; }
.dc-search i {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--dc-dim); font-size: 16px;
}
.dc-search input {
  width: 100%; height: 46px; border: 1px solid var(--dc-border);
  border-radius: 12px; padding: 0 16px 0 44px; font-size: 14px; color: var(--dc-text);
  background: var(--dc-surface); box-shadow: var(--dc-shadow); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.dc-search input::placeholder { color: var(--dc-dim); }
.dc-search input:focus { border-color: var(--dc-primary); box-shadow: 0 0 0 4px var(--dc-primary-soft); }
.dc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dc-action {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 16px; border-radius: 12px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
  color: var(--dc-text); background: var(--dc-surface); border: 1px solid var(--dc-border);
  box-shadow: var(--dc-shadow); transition: transform .12s, box-shadow .15s, border-color .15s;
}
.dc-action:hover { transform: translateY(-1px); box-shadow: var(--dc-shadow-hover); color: var(--dc-text); }
.dc-action i { font-size: 15px; color: var(--dc-primary); }
.dc-action.dc-action-primary { color: #fff; background: var(--dc-primary); border-color: transparent; }
.dc-action.dc-action-primary i { color: #fff; }

/* Section heading --------------------------------------------------------- */
.dc-section-head { display: flex; align-items: baseline; justify-content: space-between;
  margin: 24px 2px 12px; gap: 12px; }
.dc-section-title { font-size: 15px; font-weight: 800; color: var(--dc-text); letter-spacing: -.01em; }
.dc-section-sub { font-size: 12.5px; color: var(--dc-muted); }

/* Date-range filter bar ---------------------------------------------------- */
.dc-filterbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.dc-filter-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--dc-muted); }
.dc-filter-label i { color: var(--dc-primary); font-size: 15px; }
.dc-presets { display: inline-flex; gap: 4px; padding: 4px; background: var(--dc-surface-2);
  border: 1px solid var(--dc-border); border-radius: 12px; }
.dc-presets button { border: 0; background: none; cursor: pointer; padding: 7px 14px; border-radius: 9px;
  font-size: 12.5px; font-weight: 700; color: var(--dc-muted); transition: background .12s, color .12s; }
.dc-presets button:hover { color: var(--dc-primary); }
.dc-presets button.active { background: var(--dc-surface); color: var(--dc-primary); box-shadow: var(--dc-shadow); }
.dc-daterange { display: inline-flex; align-items: center; gap: 8px; }
.dc-daterange input[type="date"] { height: 38px; border: 1px solid var(--dc-border); border-radius: 10px;
  padding: 0 12px; font-size: 13px; color: var(--dc-text); background: var(--dc-surface); outline: none; font-family: inherit; }
.dc-daterange input[type="date"]:focus { border-color: var(--dc-primary); box-shadow: 0 0 0 3px var(--dc-primary-soft); }
.dc-daterange-sep { font-size: 12.5px; color: var(--dc-dim); }
.dc-apply { height: 38px; padding: 0 18px; border: 0; border-radius: 10px; background: var(--dc-primary);
  color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; transition: filter .12s; }
.dc-apply:hover { filter: brightness(1.08); }
@media (max-width: 700px) { .dc-filterbar { gap: 8px; } .dc-daterange { width: 100%; } .dc-daterange input[type="date"] { flex: 1; } }

/* KPI grid ---------------------------------------------------------------- */
.dc-kpis { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1200px) { .dc-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .dc-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .dc-kpis { grid-template-columns: 1fr; } }

.dc-kpi {
  position: relative; display: block; text-decoration: none;
  background: var(--dc-surface); border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius); padding: 18px 18px 14px; box-shadow: var(--dc-shadow);
  transition: transform .12s, box-shadow .15s, border-color .15s; overflow: hidden;
}
a.dc-kpi, .dc-kpi[role="button"] { cursor: pointer; }
.dc-kpi:hover { transform: translateY(-2px); box-shadow: var(--dc-shadow-hover); }
.dc-kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--dc-accent, var(--dc-primary)); opacity: .5;
}
.dc-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dc-kpi-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 19px; background: var(--dc-accent-soft, var(--dc-primary-soft)); color: var(--dc-accent, var(--dc-primary));
}
.dc-kpi-label { font-size: 12.5px; font-weight: 600; color: var(--dc-muted); margin: 14px 0 2px; text-transform: none; }
.dc-kpi-value { font-size: 30px; line-height: 1.05; font-weight: 800; color: var(--dc-text); letter-spacing: -.02em; }
.dc-kpi-value small { font-size: 14px; font-weight: 600; color: var(--dc-muted); }
.dc-kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; min-height: 22px; }
/* Deltas: quiet inline text, not loud pills — so a naturally-low partial period
   doesn't read as a scary red alert. */
.dc-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600;
  padding: 1px 2px; border-radius: 6px; background: transparent; }
.dc-delta.up   { color: #0f7a58; }
.dc-delta.down { color: #a8536a; }
.dc-delta.flat { color: var(--dc-dim); }
.dc-spark { width: 92px; height: 26px; display: block; }

/* accent variants — unified to the navy brand for a restrained, non-decorative look.
   Colour is reserved for meaning (chart series, status badges, deltas), not KPI chrome. */
.dc-a-indigo, .dc-a-teal, .dc-a-green, .dc-a-amber,
.dc-a-rose, .dc-a-violet, .dc-a-slate {
  --dc-accent: var(--dc-primary);
  --dc-accent-soft: var(--dc-primary-soft);
}

/* Panels (chart / lists) -------------------------------------------------- */
.dc-grid-2 { display: grid; gap: 16px; grid-template-columns: 1.6fr 1fr; }
@media (max-width: 1000px) { .dc-grid-2 { grid-template-columns: 1fr; } }

.dc-panel { background: var(--dc-surface); border: 1px solid var(--dc-border);
  border-radius: var(--dc-radius); box-shadow: var(--dc-shadow); padding: 18px 18px 8px; }
.dc-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.dc-panel-title { font-size: 15px; font-weight: 800; color: var(--dc-text); }
.dc-panel-sub { font-size: 12.5px; color: var(--dc-muted); }

/* Legend + chart */
.dc-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.dc-legend button {
  display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--dc-muted); padding: 4px 2px;
}
.dc-legend button.off { opacity: .35; }
.dc-legend .dot { width: 10px; height: 10px; border-radius: 3px; }
.dc-chart { width: 100%; height: 260px; margin-top: 8px; }
.dc-chart .grid line { stroke: #eef1f6; stroke-width: 1; }
.dc-chart .axis text { fill: var(--dc-dim); font-size: 10.5px; }
.dc-chart .serieline { fill: none; stroke-width: 2; }
.dc-chart .seriearea { opacity: .05; }
.dc-chart .dotpt { stroke: #fff; stroke-width: 1.5; }

/* Mini list panel (e.g. shortcuts summary / pending) */
.dc-list { list-style: none; margin: 6px 0 12px; padding: 0; }
.dc-list li { display: flex; align-items: center; gap: 12px; padding: 11px 6px; border-top: 1px solid var(--dc-border); }
.dc-list li:first-child { border-top: 0; }
.dc-list .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: var(--dc-accent-soft, var(--dc-primary-soft)); color: var(--dc-accent, var(--dc-primary)); font-size: 15px; }
.dc-list .tx { flex: 1; min-width: 0; }
.dc-list .tx b { display: block; font-size: 13.5px; color: var(--dc-text); font-weight: 700; }
.dc-list .tx span { font-size: 12px; color: var(--dc-muted); }
.dc-list .val { font-size: 16px; font-weight: 800; color: var(--dc-text); }

/* Shortcuts --------------------------------------------------------------- */
.dc-shortcuts { display: grid; gap: 14px; grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1200px) { .dc-shortcuts { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 760px)  { .dc-shortcuts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px)  { .dc-shortcuts { grid-template-columns: repeat(2, 1fr); } }
.dc-shortcut {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  text-align: center; text-decoration: none; padding: 18px 12px; min-height: 118px;
  background: var(--dc-surface); border: 1px solid var(--dc-border); border-radius: var(--dc-radius-sm);
  box-shadow: var(--dc-shadow); transition: transform .12s, box-shadow .15s, border-color .15s;
}
.dc-shortcut:hover { transform: translateY(-2px); box-shadow: var(--dc-shadow-hover); border-color: var(--dc-primary); }
.dc-shortcut img { height: 46px; width: auto; object-fit: contain; }
.dc-shortcut span { font-size: 12.5px; font-weight: 600; color: var(--dc-text); line-height: 1.25; }

/* Skeleton loading -------------------------------------------------------- */
.dc-sk { color: transparent !important; position: relative; border-radius: 6px; }
.dc-sk::after { content: ""; position: absolute; inset: 0; border-radius: 6px;
  background: linear-gradient(90deg, #eef1f6 25%, #f6f8fb 37%, #eef1f6 63%);
  background-size: 400% 100%; animation: dc-shimmer 1.3s ease infinite; }
@keyframes dc-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Empty state ------------------------------------------------------------- */
.dc-empty { text-align: center; color: var(--dc-muted); padding: 26px 10px; font-size: 13px; }
.dc-empty i { display: block; font-size: 26px; color: var(--dc-dim); margin-bottom: 8px; }

/* Patient list (doctor) --------------------------------------------------- */
.dc-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--dc-surface-2);
  border: 1px solid var(--dc-border); border-radius: 12px; }
.dc-tab { border: 0; background: none; cursor: pointer; padding: 8px 16px; border-radius: 9px;
  font-size: 13px; font-weight: 700; color: var(--dc-muted); }
.dc-tab.active { background: var(--dc-surface); color: var(--dc-primary); box-shadow: var(--dc-shadow); }
.dc-tab .count { display: inline-block; margin-left: 6px; font-size: 11px; padding: 1px 7px; border-radius: 999px;
  background: var(--dc-primary-soft); color: var(--dc-primary); font-weight: 800; }

.dc-ptable { width: 100%; border-collapse: collapse; }
.dc-ptable th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--dc-dim); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--dc-border); }
.dc-ptable td { padding: 12px; border-bottom: 1px solid var(--dc-border); font-size: 13.5px; color: var(--dc-text); vertical-align: middle; }
.dc-ptable tr:last-child td { border-bottom: 0; }
.dc-ptable tbody tr { transition: background .12s; }
.dc-ptable tbody tr:hover { background: var(--dc-surface-2); }
.dc-pt-name { display: flex; align-items: center; gap: 11px; }
.dc-pt-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 34px;
  background: var(--dc-primary-soft); color: var(--dc-primary); font-weight: 800; font-size: 12.5px; }
.dc-pt-name b { font-weight: 700; }
.dc-pt-name small { color: var(--dc-muted); display: block; font-size: 11.5px; }
.dc-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.dc-badge.b-green { background: var(--dc-green-soft); color: var(--dc-green); }
.dc-badge.b-amber { background: var(--dc-amber-soft); color: var(--dc-amber); }
.dc-badge.b-slate { background: #eef1f6; color: #475569; }
.dc-badge.b-indigo{ background: var(--dc-primary-soft); color: var(--dc-primary); }

/* ==========================================================================
   One-screen (no page scroll) layout — scoped to `.dc-screen` (index.html only)
   ========================================================================== */
.dc-screen { display: flex; flex-direction: column; gap: 12px; overflow: hidden; padding: 2px 2px 4px; }

/* slim top bar: greeting + search + actions + chips on one row */
.dc-topbar { display: flex; align-items: center; gap: 14px; flex: 0 0 auto;
  background: linear-gradient(180deg,#fff 0%, #fbfcff 100%); border: 1px solid var(--dc-border);
  border-radius: 14px; padding: 10px 16px; box-shadow: var(--dc-shadow); }
.dc-topbar-l { flex: 0 0 auto; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.dc-topbar-l h1 { margin: 0; font-size: 18px; font-weight: 800; color: var(--dc-text); white-space: nowrap; }
.dc-topbar-l .dc-hero-date { font-size: 12px; color: var(--dc-muted); white-space: nowrap; }
.dc-topbar .dc-search { flex: 1 1 auto; min-width: 140px; }
.dc-topbar .dc-search input { height: 40px; box-shadow: none; }
.dc-topbar-r { flex: 0 0 auto; margin-left: auto; display: flex; align-items: center; gap: 8px; }
.dc-topbar-r .dc-action { height: 40px; padding: 0 13px; font-size: 12.5px; box-shadow: none; }
.dc-topbar-r .dc-chip { padding: 7px 11px; font-size: 12px; box-shadow: none; }

/* compact KPI row */
.dc-kpis-sm { flex: 0 0 auto; grid-template-columns: repeat(8, 1fr); gap: 10px; }
@media (max-width: 1250px) { .dc-kpis-sm { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px)  { .dc-kpis-sm { grid-template-columns: repeat(2, 1fr); } }
.dc-kpis-sm .dc-kpi { padding: 11px 13px 10px; border-radius: 12px; }
.dc-kpis-sm .dc-kpi::before { width: 3px; }
.dc-kpis-sm .dc-kpi-icon { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
.dc-kpis-sm .dc-kpi-label { margin: 8px 0 1px; font-size: 11px; }
.dc-kpis-sm .dc-kpi-value { font-size: 22px; }
.dc-kpis-sm .dc-kpi-value small { font-size: 11px; }
.dc-kpis-sm .dc-kpi-foot { margin-top: 6px; min-height: 18px; }
.dc-kpis-sm .dc-spark { display: none; }              /* trend lives in the main chart */
.dc-kpis-sm .dc-delta { font-size: 11px; padding: 2px 7px; }

/* main fill area: chart (left) + side stack (right) fill remaining height */
.dc-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 1.7fr 1fr; gap: 12px; }
@media (max-width: 900px) { .dc-main { grid-template-columns: 1fr; } }
.dc-main .dc-panel { padding: 14px 16px 10px; }
.dc-panel-fill { display: flex; flex-direction: column; min-height: 0; }
.dc-panel-fill .dc-chart { flex: 1 1 auto; height: auto; min-height: 120px; margin-top: 4px; }
.dc-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.dc-panel-week { flex: 0 0 auto; }
.dc-panel-week .dc-list { margin: 4px 0 4px; }
.dc-panel-week .dc-list li { padding: 7px 4px; }
.dc-panel-shortcuts { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.dc-panel-shortcuts .dc-shortcuts { margin-top: 6px; overflow: auto; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: start; }
.dc-panel-shortcuts .dc-shortcut { min-height: 0; padding: 9px 6px; gap: 6px; border-radius: 10px; }
.dc-panel-shortcuts .dc-shortcut img { height: 28px; }
.dc-panel-shortcuts .dc-shortcut span { font-size: 11px; }
.dc-panel .dc-panel-title { font-size: 14px; }

/* ==========================================================================
   Internal messaging (messages.html) + notification bell (dashboard)
   ========================================================================== */
.msg-list { list-style: none; margin: 6px 0 0; padding: 0; overflow: auto; }
.msg-item { display: flex; gap: 12px; padding: 12px 12px; border-radius: 12px; cursor: pointer;
  border: 1px solid transparent; transition: background .12s, border-color .12s; }
.msg-item:hover { background: var(--dc-surface-2); }
.msg-item.active { background: var(--dc-primary-soft); border-color: var(--dc-primary); }
.msg-item.unread { background: #f6f9ff; }
.msg-av { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; display: grid; place-items: center;
  background: var(--dc-primary-soft); color: var(--dc-primary); font-weight: 800; font-size: 13px; }
.msg-body { flex: 1; min-width: 0; }
.msg-row1 { display: flex; align-items: center; gap: 8px; }
.msg-from { font-weight: 700; font-size: 13.5px; color: var(--dc-text); }
.msg-time { margin-left: auto; font-size: 11px; color: var(--dc-dim); white-space: nowrap; }
.msg-subj { font-size: 13px; color: var(--dc-text); font-weight: 600; margin-top: 2px; }
.msg-item.unread .msg-subj { font-weight: 800; }
.msg-snip { font-size: 12px; color: var(--dc-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dc-primary); flex: 0 0 8px; }

.prio { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.prio-Urgent { background: var(--dc-rose-soft); color: var(--dc-rose); }
.prio-High { background: var(--dc-amber-soft); color: var(--dc-amber); }
.prio-Normal { background: #eef1f6; color: #475569; }
.prio-Low { background: #eef1f6; color: #8b91a8; }
.mtype { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; background: var(--dc-teal-soft); color: #0369a1; }

/* reader */
.msg-reader-head { border-bottom: 1px solid var(--dc-border); padding-bottom: 12px; margin-bottom: 12px; }
.msg-reader-subj { font-size: 19px; font-weight: 800; color: var(--dc-text); margin: 6px 0; }
.msg-reader-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--dc-muted); font-size: 12.5px; }
.msg-reader-text { font-size: 14px; line-height: 1.6; color: var(--dc-text); white-space: pre-wrap; }

/* compose modal */
.mm-overlay { position: fixed; inset: 0; background: rgba(14,20,48,.45); z-index: 1200; display: none; align-items: center; justify-content: center; padding: 20px; }
.mm-overlay.open { display: flex; }
.mm-modal { background: #fff; border-radius: 18px; width: 640px; max-width: 100%; max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(14,20,48,.35); }
.mm-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--dc-border); }
.mm-head h3 { margin: 0; font-size: 17px; font-weight: 800; color: var(--dc-text); }
.mm-x { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--dc-dim); cursor: pointer; }
.mm-body { padding: 18px 20px; overflow: auto; }
.mm-field { margin-bottom: 14px; }
.mm-field label { display: block; font-size: 12px; font-weight: 700; color: var(--dc-muted); margin-bottom: 6px; }
.mm-input, .mm-textarea, .mm-select { width: 100%; border: 1px solid var(--dc-border); border-radius: 10px; padding: 10px 12px; font-size: 14px; color: var(--dc-text); background: #fff; outline: none; }
.mm-input:focus, .mm-textarea:focus, .mm-select:focus { border-color: var(--dc-primary); box-shadow: 0 0 0 4px var(--dc-primary-soft); }
.mm-textarea { min-height: 130px; resize: vertical; }
.mm-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mm-recip-box { border: 1px solid var(--dc-border); border-radius: 10px; max-height: 190px; overflow: auto; }
.mm-recip-search { position: sticky; top: 0; background: #fff; padding: 8px; border-bottom: 1px solid var(--dc-border); }
.mm-recip-search input { width: 100%; border: 1px solid var(--dc-border); border-radius: 8px; padding: 7px 10px; font-size: 13px; outline: none; }
.mm-recip { display: flex; align-items: center; gap: 10px; padding: 8px 12px; cursor: pointer; font-size: 13px; }
.mm-recip:hover { background: var(--dc-surface-2); }
.mm-recip input { width: 16px; height: 16px; accent-color: var(--dc-primary); }
.mm-recip .r-name { font-weight: 600; color: var(--dc-text); }
.mm-recip .r-id { color: var(--dc-dim); font-size: 11.5px; }
.mm-selbar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 12.5px; color: var(--dc-muted); }
.mm-selbar a { color: var(--dc-primary); font-weight: 700; cursor: pointer; text-decoration: none; }
.mm-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--dc-border); }

/* notification bell (dashboard top bar) */
.dc-bell { position: relative; }
.dc-bell-btn { position: relative; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--dc-border);
  background: var(--dc-surface); cursor: pointer; display: grid; place-items: center; color: var(--dc-text); font-size: 17px; }
.dc-bell-btn:hover { border-color: var(--dc-primary); color: var(--dc-primary); }
.dc-bell-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--dc-rose); color: #fff; font-size: 11px; font-weight: 800; display: none; align-items: center; justify-content: center; }
.dc-bell-badge.show { display: flex; }
.dc-bell-pop { position: absolute; right: 0; top: 48px; width: 340px; max-width: 88vw; background: #fff; border: 1px solid var(--dc-border);
  border-radius: 14px; box-shadow: var(--dc-shadow-hover); z-index: 1100; display: none; overflow: hidden; }
.dc-bell-pop.open { display: block; }
.dc-bell-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--dc-border); }
.dc-bell-pop-head b { font-size: 14px; color: var(--dc-text); }
.dc-bell-pop-head a { font-size: 12px; color: var(--dc-primary); cursor: pointer; text-decoration: none; font-weight: 700; }
.dc-bell-list { max-height: 360px; overflow: auto; }
.dc-bell-row { display: flex; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--dc-border); cursor: pointer; }
.dc-bell-row:first-child { border-top: 0; }
.dc-bell-row:hover { background: var(--dc-surface-2); }
.dc-bell-row.unread { background: #f6f9ff; }
.dc-bell-row .b-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: 0 0 8px; background: transparent; }
.dc-bell-row.unread .b-dot { background: var(--dc-primary); }
.dc-bell-row .b-tx b { display: block; font-size: 13px; color: var(--dc-text); }
.dc-bell-row .b-tx span { font-size: 11.5px; color: var(--dc-muted); }
.dc-bell-foot { padding: 10px 14px; text-align: center; border-top: 1px solid var(--dc-border); }
.dc-bell-foot a { font-size: 12.5px; color: var(--dc-primary); font-weight: 700; text-decoration: none; }
